﻿using System;
using System.Net;

namespace SCG.SolarVengeanceEngine
{
    //order types
    public enum OrderType { None, BuildShield, BuildScanner, BuildStarShip, Move, Escort, Patrol, Defend, Unload,
        AutoShields, AutoScanners, AutoStarShip, TargetStarSystem, ClearOrders, TargetStarShip, DefendPoint,
        BuildStarShipAutoPos, AttackAdjacent, Transport, SetAutoBuildType, TugRelease, TargetMapObject, GravRelease,
        CreateGate, ShipBuildStarShip, ShipBuildStarShipAutoPos, Detonate, SetViewPoint, EjectUDO, Surrender,
        Alliance, Launch, BoardCarrier };

    //state change types
    public enum StateChange { SetShields, SetScanners, SetResources, BuildStarShip, AssignOrder, AutoBuildChanges,
        AutoShields, AutoScanners, AutoStarShip, ClearOrder, ConquerStarSystem, DestroyStarShip, AttackStarSystem,
        SetKnownWeapons, Damage, SetShipResources, AttackAdjacent, Victory, Victor, SetAutoBuildType, ShipMoved,
        ShipHijacked, ScenarioData, DisplayMessage, ObjectRelocated, Explosion, SetTerrain, RemoveObject,
        SetShipValues, Towing, AdjustShipValues, Dragging, ObjectMoved, CreateGate, BeamAttack, SetKillPoints,
        SetViewPoint, UDOMoved, EjectUDO, Surrender, Alliance, CreateStarSystem, CreateWormhole, CreateBlackHole,
        CreatePulsar, SetBlackHoleRadius, CreateUDO, AdjustSystemValues, EmbarkStarShip, LaunchShips,
        ConvertStarSystem };

    //convert order type to button display
    public static class OrderTypeExtensions
    {
        public static string ToDisplayName(this OrderType ot)
        {
            switch (ot)
            {
                case OrderType.TugRelease:
                case OrderType.GravRelease:
                    return "Release";
                case OrderType.CreateGate:
                    return "Create Gate";
                case OrderType.ShipBuildStarShip:
                    return "Build StarShip";
                case OrderType.SetViewPoint:
                    return "Set View Point";
                case OrderType.EjectUDO:
                    return "Eject";
                default:
                    return ot.ToString();
            }
        }
    }
}
